package utils;

import java.util.Calendar;
import java.util.Date;

public class DateService {
    
    public static Date tomorrow() {
        Date now = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(now);
        calendar.set(Calendar.HOUR, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.add(Calendar.DATE, 1);
        return calendar.getTime();
    }
    
    public static Date threeDays() {
        Date now = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(now);
        calendar.set(Calendar.HOUR, 23);
        calendar.set(Calendar.MINUTE, 59);
        calendar.add(Calendar.DATE, 3);
        return calendar.getTime();
    }

    public static Date hoursLater(Date date, int i) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.HOUR_OF_DAY, i);
        return calendar.getTime();
    }
}
